doctype html
html.no-js(lang='en')
  head
    meta(charset='utf-8')
    meta(http-equiv='x-ua-compatible' content='ie=edge')
    title Pull To Refresh Demo (#{process.env.NODE_ENV || 'development'})
    meta(name='viewport' content='width=device-width, initial-scale=1')
    link(rel='stylesheet' href='style.css')

  body
    header
      .wrap
        block header
          h1 Demo

    #main
      block main

      .wrap
        block content
          | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
          | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
          | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
          | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
          | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
          | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        p.links
          a(href='raw.html') Raw
          a(href='basic.html') Basic
          a(href='shouldptr.html') Should pull to refresh?
          a(href='trigger.html') Trigger
          a(href='promise.html') Promise
          a(href='callback.html') Callback
          a(href='multiple.html') Multiple Instances
          a(href='tolerance.html') With tolerance

    #footer
      .wrap
        ul.footer-links
          li
            a(href='https://www.boxfactura.com/pulltorefresh.js/') PullToRefresh.js
          li
            a(href='https://github.com/BoxFactura/pulltorefresh.js') Contribute on Github

    if process.env.NODE_ENV === 'test'
      //- this will enable TouchEmulator() for e2e-testing
      script.
        var s = document.createElement('script');
        s.src = '//unpkg.com/hammer-touchemulator@0.0.2/touch-emulator.js';
        s.onload = function () { window.TouchEmulator(); };
        document.getElementsByTagName('head')[0].appendChild(s);

    script(src='pulltorefresh.min.js')

    block run
